<template>
  <div v-if="visible" class="agent-timecard-add_tips">
    <div class="agent-timecard-add_tips_header">
      按阶梯收费
      <i
        @click="handleClose"
        class="agent-timecard-add_tips_header_close el-icon-close"
      >
      </i>
    </div>
    <div class="agent-timecard-add_tips_body">
      <div class="agent-timecard-add_tips__div agent-timecard-add_tips__bold">
        假如你的费用设置为:
      </div>
      <div class="agent-timecard-add_tips__div">0~200w，1元/小时</div>
      <div class="agent-timecard-add_tips__div">≥ 200w，2元/小时</div>
      <div class="agent-timecard-add_tips__div agent-timecard-add_tips__bold">
        如果充电5小时，功率200w以上，时长卡抵扣时长为：
      </div>
      <div class="agent-timecard-add_tips__div">T=5*（2/1）=10小时</div>
      <div class="agent-timecard-add_tips__button">
        <el-button @click="handleClose">我知道了</el-button>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'tips',
  props: {
    visible: {
      type: Boolean,
      required: true,
    },
  },
  methods: {
    handleClose() {
      this.$emit('update:visible', false)
    },
  },
}
</script>
<style lang="scss" scoped>
.agent-timecard-add_tips {
  width: 400px;
  height: 302px;
  position: absolute;
  top: 25%;
  left: 40%;
  z-index: 999;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #ddd;
  .agent-timecard-add_tips_header {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background: linear-gradient(90deg, #3b4a8b, #2f3778);
    font-size: 16px;
    color: #fff;
    position: relative;
    padding: 8;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;

    .agent-timecard-add_tips_header_close {
      position: absolute;
      right: 10px;
      color: #988ca4;
      font-weight: bold;
    }
  }

  .agent-timecard-add_tips_body {
    font-size: 14px;
    padding: 15px 30px 30px;

    .agent-timecard-add_tips__div {
      margin-bottom: 10px;
      color: #988ca4;
      cursor: pointer;
    }

    .agent-timecard-add_tips__bold {
      font-weight: bold;
      color: #000;
    }
  }
}
</style>
<style lang="scss">
.agent-timecard-add_tips__button {
  .el-button {
    width: 204px;
    height: 44px;
    background: #fff;
    display: block;
    border: 1px solid #d6d8e0;
    border-radius: 22px;
    box-shadow: 0 2px 4px 0 rgb(171 174 188 / 35%);
    margin: auto;
    color: #988ca4;
  }
}
</style>
